home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / util / batch / TestDevice.readme < prev   
Text File  |  1995-07-02  |  3KB  |  114 lines

  1. Short:    Does an IF EXISTS. Suppresses requester.
  2. Author:   wbow@crl.com (Will Bow)
  3. Uploader: colin@cts.com 
  4. Type:     util/batch
  5.  
  6.        ______          __  ____            _         
  7.       /_  __/__  _____/ /_/ __ \___ _   __(_)_______ 
  8.        / / / _ \/ ___/ __/ / / / _ \ | / / / ___/ _ \
  9.       / / /  __(__  ) /_/ /_/ /  __/ |/ / / /__/  __/
  10.      /_/  \___/____/\__/_____/\___/|___/_/\___/\___/ 
  11.                                                  
  12.                     __
  13.                     | |__ _  _ 
  14.                     | '_ \ || |
  15.                     |_.__/\_, |
  16.                           |__/ 
  17.  
  18.   ___  ___ _____ _   _   ___       __ _                       
  19.  | _ )/ _ \_   _| |_| | / __| ___ / _| |___ __ ____ _ _ _ ___ 
  20.  | _ \ (_) || | |  _  | \__ \/ _ \  _|  _\ V  V / _` | '_/ -_)
  21.  |___/\___/ |_| |_| |_| |___/\___/_|  \__|\_/\_/\__,_|_| \___|
  22.                                                               
  23.  
  24.  Distribution: Freeware, freely distributable
  25.  
  26.  
  27.  Requirements: WB2.x and up
  28.                Might work on 1.3 (not tested)
  29.  
  30.  
  31.  Description:
  32.  
  33.      Performs an "If Exists" on a device or device:filename. If the device
  34.      or filename does not exist, the resultant system requester will
  35.      be suppressed.
  36.  
  37.      Returns a Zero if the device:file exists and a Five (Warn) if the
  38.      device:file does not exist. 
  39.  
  40.      Source, written in C, is available upon request.
  41.  
  42.  
  43.  Usage from a DOS Script or the shell:
  44.  
  45.      testdevice device:[filename]
  46.  
  47.  
  48.  Example:
  49.  
  50.      Assume your script wants to find out if a certain device has been 
  51.      mounted. Normally you would issue an If Exists like this:
  52.  
  53.           If Exists NET:
  54.                ::
  55.                ::
  56.           Endif
  57.  
  58.      If NET: exists, the system returns a Zero and the script continues.
  59.      If NET: does not exist, a system requester will pop up, informing 
  60.      the user that NET: is not mounted, and the script stops until the
  61.      requester is cleared with a mouse click.
  62.  
  63.      Testdevice does the same thing, but will not stop the script with 
  64.      a system requester if the device does not exist.
  65.  
  66.           testdevice NET:
  67.           If Warn
  68.           ; failed. NET: does not exist 
  69.             ::
  70.             ::
  71.           Else
  72.           ; suceeded. NET: is mounted.
  73.             ::
  74.             ::
  75.           EndIf
  76.  
  77.      You may include a filename to test like this:
  78.  
  79.           testdevice NET:node.rinfo
  80.  
  81.      You may use testdevice to see if a floppy disk is physically 
  82.      inserted into a floppy drive. Testdevice df0: will return a
  83.      five if a diskette is not in the drive. 
  84.  
  85.      Testdevice may be renamed. Volumes may be tested as well.
  86.  
  87.  
  88.  History
  89.      
  90.      This file was written to overcome problems when starting ParNFS on 
  91.      a remote, unattended A600T. Since no operator was present to 
  92.      clear a system requester, a way had to be found to test the existance 
  93.      of a device without the possibility of bringing the script to a 
  94.      halt.
  95.  
  96.  
  97.  Installation:
  98.  
  99.      Copy testdevice to any place in the path.
  100.  
  101.  
  102.  Authors:      wbow@crl.com   colin@cts.com
  103.                Will Bow       Colin Thompson
  104.  
  105.  
  106. ============================= Archive contents =============================
  107.  
  108. Original  Packed Ratio    Date     Time    Name
  109. -------- ------- ----- --------- --------  -------------
  110.     5980    3372 43.6% 16-Jun-95 15:45:34 +TestDevice
  111.     3087    1249 59.5% 16-Jun-95 15:45:34 +TestDevice.readme
  112. -------- ------- ----- --------- --------
  113.     9067    4621 49.0% 17-Jun-95 18:15:04   2 files
  114.